package org.jint.adsltest.analysis;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionUtil {
	public static Connection getCon() {

		Connection conn = null;
		try {
			// 连接SQLite的JDBC
			Class.forName("org.sqlite.JDBC");
			// 数据库名db/testdata.db的连接，如果不存在就在当前目录下创建之
			conn = DriverManager.getConnection("jdbc:sqlite:db/testdata.db");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		} catch (SQLException e) {
			e.printStackTrace();
		}

		return conn;

	}
}
